
import 'package:eyepetizer_example/model/common_item.dart';
import 'package:eyepetizer_example/viewmodel/base_list_viewmodel.dart';

import '../../http/Url.dart';

class CategoryDetailViewModel extends BaseListViewModel<ItemList, IssueList> {
  // 区分点击的那个分类，必须传
  int categoryId;

  CategoryDetailViewModel(this.categoryId);
  @override
  IssueList getModel(Map<String, dynamic> json) => IssueList.fromJson(json);

  @override
  String getUrl() {
    return "${Url.categoryVideoUrl}id=$categoryId&udid=d2807c895f0348a180148c9dfa6f2feeac0781b5&deviceModel=Android";
  }

  @override
  String? getNextUrl(IssueList model) {
    return "${model.nextPageUrl}&udid=d2807c895f0348a180148c9dfa6f2feeac0781b5&deviceModel=Android";
  }
}